public class 正则表达式Test {
    public static void main(String[] args) {

        String str = "234234324";
        //是否为纯整数字
        //正则不能用正斜杠，得用反斜杠
        boolean matches = str.matches("\\d+");
        System.out.println(matches);

        String regex  = "1[12345][0-9]{9}";
        String phoneNum = "12522222222";
        boolean result = phoneNum.matches(regex);
        System.out.println(result);
    }
}
